[BUILD] Fix re-use of existing config files in dist/install/boot.
authorchris@kneesaa.uk.xensource.com <chris@kneesaa.uk.xensource.com>
Sat, 8 Jul 2006 18:22:34 +0000 (19:22 +0100)
committerchris@kneesaa.uk.xensource.com <chris@kneesaa.uk.xensource.com>
Sat, 8 Jul 2006 18:22:34 +0000 (19:22 +0100)
- the name of the config file was computed incorrectly because of the
  linux version number 4th digit being present in both LINUX_VER and
  EXTRAVERSION extracted from the linux Makefile.
- DESTDIR was not set for the prep and config targets.

Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
buildconfigs/Rules.mk
buildconfigs/mk.linux-2.6-xen

index 5e7d659a5b4faf80f78a8881f42a42f40bbd113c..0a508b782b4d10045e9e5b6542ba3d0fc94ebacc 100644 (file)
@@ -69,9 +69,6 @@ ref-%/.valid-ref: pristine-%/.valid-pristine
        touch $@ # update timestamp to avoid rebuild
 endif
 
-%-prep:
-       $(MAKE) -f buildconfigs/mk.$* prep
-
 %-install:
        $(MAKE) -f buildconfigs/mk.$* build
 
@@ -83,15 +80,20 @@ endif
 %-build: %-dist
        @: # do nothing
 
+%-prep: DESTDIR=$(DISTDIR)/install
+%-prep:
+       $(MAKE) -f buildconfigs/mk.$* prep
+
+%-config: DESTDIR=$(DISTDIR)/install
+%-config:
+       $(MAKE) -f buildconfigs/mk.$* config
+
 %-delete:
        $(MAKE) -f buildconfigs/mk.$* delete
 
 %-clean:
        $(MAKE) -f buildconfigs/mk.$* clean
 
-%-config:
-       $(MAKE) -f buildconfigs/mk.$* config
-
 linux-2.6-xen.patch: ref-linux-$(LINUX_VER)/.valid-ref
        rm -rf tmp-$@
        cp -al $(<D) tmp-$@
index ce861acc1bd47654a643de23ffc6086d430a3b9f..5de144259fe6b792bf9289b2e719601a997aaa25 100644 (file)
@@ -5,6 +5,8 @@ EXTRAVERSION ?= xen
 
 LINUX_DIR    = linux-$(LINUX_VER)-$(EXTRAVERSION)
 
+LINUX_VER3  := $(LINUX_SERIES).$(word 3, $(subst ., ,$(LINUX_VER)))
+
 include buildconfigs/Rules.mk
 
 # The real action starts here!
@@ -25,8 +27,8 @@ $(LINUX_DIR)/include/linux/autoconf.h: ref-linux-$(LINUX_VER)/.valid-ref
           LINUX_ARCH=$(LINUX_ARCH) bash ./mkbuildtree ../$(LINUX_DIR) )
        # Re-use config from install dir if one exits else use default config
        CONFIG_VERSION=$$(sed -ne 's/^EXTRAVERSION = //p' $(LINUX_DIR)/Makefile); \
-       [ -r $(DESTDIR)/boot/config-$(LINUX_VER)$$CONFIG_VERSION-$(EXTRAVERSION) ] && \
-         cp $(DESTDIR)/boot/config-$(LINUX_VER)$$CONFIG_VERSION-$(EXTRAVERSION) $(LINUX_DIR)/.config \
+       [ -r $(DESTDIR)/boot/config-$(LINUX_VER3)$$CONFIG_VERSION-$(EXTRAVERSION) ] && \
+         cp $(DESTDIR)/boot/config-$(LINUX_VER3)$$CONFIG_VERSION-$(EXTRAVERSION) $(LINUX_DIR)/.config \
          || cp buildconfigs/linux-defconfig_$(EXTRAVERSION)_$(XEN_TARGET_ARCH)$(XEN_SYSTYPE) \
                $(LINUX_DIR)/.config
        # See if we need to munge config to enable PAE